import http from '../utils/request'
const TaskAPI = {
	/**任务列表 */
	taskList: (data) => {
		return http.request({
			url: '/api/restaurant/task/page',
			method: 'GET',
			data
		})
	},

	/**任务列表 */
	taskDetail: (data) => {
		return http.request({
			url: '/api/restaurant/task/detail',
			method: 'GET',
			data
		})
	},

    
    /**任务记录列表 */
    taskRecordList: (data) => {
    	return http.request({
    		url: '/api/restaurant/taskrecord/list',
    		method: 'GET',
    		data
    	})
    },
    /**任务记录详情 */
    taskRecordDetail: (data) => {
    	return http.request({
    		url: `/api/restaurant/taskrecord/detail`,
    		method: 'GET',
    		data
    	})
    },
    /**任务记录上传 */
    taskRecordSave: (data) => {
    	return http.request({
    		url: `/api/restaurant/taskrecord/update`,
    		method: 'POST',
    		data
    	})
    },

	/**任务下发 */
	taskAssign: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/assignTask`,
			method: 'POST',
			data
		})
	},
	/**
	 * 新建任务并下发
	 */
	addTask: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/addTempTask`,
			method: 'POST',
			data
		})
	},
	/**
	 * 批量下发
	 */
	taskBatchAssign: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/batchAssignTask`,
			method: 'POST',
			data
		})
	},

	/**
	 * 任务提交
	 */
	taskSubmit: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/submitTask`,
			method: 'POST',
			data
		})
	},
	/**
	 * 任务检查
	 */
	taskCheck: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/checkTask`,
			method: 'POST',
			data
		})
	},
	/**
	 * 任务驳回
	 */
	taskReject: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/rejectTask`,
			method: 'POST',
			data
		})
	},
	/**
	 * 设置执行人
	 */
	taskSetExecutor: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/setExecutor`,
			method: 'POST',
			data
		})
	},
	/**
	 * 保存草稿
	 */
	taskSaveDraft: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/saveDraft`,
			method: 'POST',
			data
		})
	},
	/**
	 * 任务评分
	 */
	taskScore: (data) => {
		return http.request({
			url: `/api/restaurant/taskrecord/scoreTask`,
			method: 'POST',
			data
		})
	},
}
export default TaskAPI